1. Field of the Invention
The present invention relates to file systems, and more particularly to storing file system referrals.
2. Related Art
Computer based information storage systems, such as databases and file systems have been widely utilized by users to access, store, modify and update persistent data. For many companies, the information storage system is considered to be a strategic capital asset that is deployed to make everyday business decisions. Persistent data may include computer files such as source code, word processing documents, data elements and information such as employee records, customer records, and content of web pages.
In a computer system, a file system defines the manner in which files are named and placed logically for storage and retrieval. Generally many file systems provide a hierarchical (tree) structure for managing files. A file is placed in a directory (or a folder or subdirectory) at the desired place in the tree structure. In the file system that is organized as a hierarchy, the root directory may include sub-directories that may include other sub-directories. Typically, a tree file system has only one root. In many operating systems, the root directory has no name. A special character that separates directories in a file system typically represents the root directory. For example, in UNIX-based systems, the root directory is represented simply as: /, and in Windows operating system, the root directory is represented as:  .
A path is the route from the root directory of a file system to a particular file. A pathname (or path name) is the specification of that path. A file system also includes a format for specifying a path to a file through the structure of directories. Well known examples of file systems include UNIX file system (xe2x80x9cUFSxe2x80x9d), Windows NT file system (xe2x80x9cNTFSxe2x80x9d), Distributed File System (xe2x80x9cDFSxe2x80x9d), Network File System (xe2x80x9cNFSxe2x80x9d) and the Andrew file system (xe2x80x9cAFSxe2x80x9d).
Referring to FIG. 1, a referral object 105, or simply xe2x80x9creferralxe2x80x9d, is used to link together multiple file system trees into a single global name space. Referral 105 is a special object in a referring file system, e.g., file system FS1110, which includes information to identify a referred file system, e.g., file system FS2120. The information included in referral 105 may describe a server location and the path of the referred file system, and it may describe the information that a user application may need in order to access the referred file system, e.g., root of FS2120. In some cases, the information included in referral 105 may include a key into a database, which then provides the server location and path of the referred file system. In a client/server architecture, referral 105 is used to redirect a client""s request to another server. Referring to FIG. 2, referral 105 is replaced for the user application by the root of the referred file system, e.g., root of FS2120, when accessed by a user application 210. A global single name space 200 is formed when the replacement is made.
It is often the case that file systems need to support looking up parent directories of a specified object, e.g., lookup the directory that includes the specified object. One example of the use of a lookup function is to construct an absolute path name for the specified object. The absolute path name is determined by climbing up the name space hierarchy using successive parent directory lookups until reaching the root of the name space. As another example, a server complying with NFS v4 functionality has a need to lookup the parent of an object when processing a LOOKUPP remote procedure call.
When global name space 200 is formed by using referrals, the parent directory of the root of a file system, as viewed by user application 210, may be located in a different file system, perhaps even on a different server. In addition, multiple referrals may refer to the same file system thus, when looking up a parent directory, the system should return a unique name. It is desirable that the name of the root directory be preferably returned as the name of the referral object referring to the root directory.
The foregoing need is addressed by the present invention. According to one form of the invention, in a method for making file systems accessible, a referring file system attribute is created, responsive to a first file system having a referral object referring to a second file system. An xe2x80x9cattributexe2x80x9d may be a field of a database record in a database context, for example, a property of an object in an object-oriented programming context, or an attribute of an element in a markup language context. A xe2x80x9cdata elementxe2x80x9d may be a record, for example, an object, or an element.
The referring file system attribute describes referring file system identification for the first file system. A path attribute is created, responsive to the first file system having the referral object, describing a path from a root of the first file system to the referral object. A referred file system attribute is created, responsive to the first file system having the referral object, describing a referred file system identification for the second file system. A parent attribute is created, responsive to the first file system having the referral object, describing a parent flag for the second file system.
In another aspect, the file systems are accessible within a global name space. Data elements having the attributes are configured for respective referral objects within the global name space and stored in a database. A dummy data element, describing a dummy referral to a root file system of the global name space, is stored in the database.
In yet another aspect of the invention a method to locate a parent directory of a second referral object includes receiving a request to locate the parent directory, the second referral object being located in a second referred file system. The database is searched for an entry matching the second referred file system. An entry matching the second referred file system is selected, wherein the entry has the parent attribute set to a true status.
Objects, advantages and other forms of the invention will be apparent upon reading the following detailed description and referring to the accompanying drawings.